package com.orangeforms.webadmin.upms.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.orangeforms.common.core.annotation.UploadFlagColumn;
import com.orangeforms.common.core.base.model.BaseModel;
import com.orangeforms.common.core.upload.UploadStoreTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Author：howlrou
 * @Date：2024/8/12 10:32
 */

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "zz_business_visible_resource")
public class VisibleResource extends BaseModel {


    /**
     * 主键id
     */
    @TableId(value = "digital_resource_id", type = IdType.AUTO)
    private Long digitalResourceId;

    /**
     * 外键，关联到collection表的id
     */
    @TableField(value = "collection_id")
    private Long collectionId;

    /**
     * 资源类型（0图片 1无法观看资源类 2文档类）
     */
    @TableField(value = "resource_type")
    private String resourceType;

    /**
     * 文件名称
     */
    @TableField(value = "file_name")
    private String fileName;

    /**
     * 文件存储路径
     */
    @TableField(value = "file_path")
    @UploadFlagColumn(storeType = UploadStoreTypeEnum.LOCAL_SYSTEM)
    private String filePath;



    /**
     * 文件大小（以字节为单位）
     */
    @TableField(value = "file_size")
    private Long fileSize;

}
